package org.iabako.shared.iservice.user;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.AsyncCallback;
import org.iabako.shared.entity.user.User;

/**
 * Created by jose on 06/01/15.
 */
public interface EmailVerificationServiceAsync {

    void sendKeyCode(String value, boolean userExistsVerification, AsyncCallback<User> iabakoAsyncCallback);

    void verifyKeyCode(String email, String keyCode, AsyncCallback<Boolean> iabakoAsyncCallback);

    public static final class Util {
        private static EmailVerificationServiceAsync instance;

        public static final EmailVerificationServiceAsync getInstance() {
            if (instance == null) {
                instance = GWT.create(EmailVerificationService.class);
            }
            return instance;
        }
    }
}
